<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn1(num){
         if(typeof num=='number'){
            if(num % 2==0 &&num !==0){
                console.log('偶数');
            }else if( num %2 !==0){
                console.log('奇数');
            }else{
                console.log('0');
            }
         }else{
             console.log('报错了');
         }
        }
        fn1('我的世界')
        fn1(0)
        fn1(1)
        fn1(2)
        // 声明 函数 2
        // 1 function 
        fn1()
        function  fn1() {
             console.log('我的世界');
        }
        // fn1()
        // 2 匿名函数
        var f=function (){
              console.log('世界');
        }
        f()
    </script>
</body>
</html>